package com.anxin.registerManagement.util;

import cn.hutool.core.util.ObjectUtil;
import com.anxin.registerManagement.exception.BusinessException;
import org.springframework.util.ObjectUtils;

public class Assert {
    public static void notNull(Object data,String message){
        if(ObjectUtil.isEmpty(data)){
            throw new BusinessException(message);
        }
    }

    public static void notNull(Object... objects) {
        for (Object object : objects) {
            if (ObjectUtils.isEmpty(object)) {
                throw new BusinessException("必要属性不能为空");
            }
        }
    }
}
